package ace;

import ace.game.entity.player.Profile;
import ace.system.BitmapFont;
import java.io.IOException;
import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import ace.states.GameState;
import ace.system.Model;

import ace.system.StateManager;
import ace.system.Utilities;
import java.util.Vector;
import javax.microedition.rms.RecordStore;

public class Main extends MIDlet {
	
	public static Main Midlet = null;

	public Main() {
		
	}

	protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
		
	}

	protected void pauseApp() {
		
	}

	protected void startApp() throws MIDletStateChangeException {
		//Set midlet
		Midlet = this;

		//Load fonts
		BitmapFont.getFont(BitmapFont.MAIN);

		//initRMS
		Utilities.initRMS();

		//Set display
		Display.getDisplay(this).setCurrent(StateManager.instance());
		StateManager.instance().goTo(GameState.SPLASH, null, false);

		//Vector param = new Vector();
		//param.addElement(new Integer(1));
        //param.addElement(new Profile());
		//StateManager.instance().goTo(GameState.GAME, param, false);

        new Thread(StateManager.instance()).start();
	}

}
